package com.xingkeduo.pojo.enums;

/**
 * @Description:
 * @Author:gaozifeng
 * @Date 2019/5/30 17:29
 **/
public enum WxHandlerEnums {
    JOBSEEKER(1, "求职者授权"),
    CRAFTSMAN(2, "发型师授权"),
    SUBSCRIBE(3, "关注公众号");

    private int type;
    private String value;

    private WxHandlerEnums(int type, String value) {
        this.type = type;
        this.value = value;
    }

    public int getType() {
        return type;
    }

    public WxHandlerEnums setType(int type) {
        this.type = type;
        return this;
    }

    public String getValue() {
        return value;
    }

    public WxHandlerEnums setValue(String value) {
        this.value = value;
        return this;
    }

    public static WxHandlerEnums getTypes(int type) {
        WxHandlerEnums[] enums = values();
        for (int i = 0; i < enums.length; ++i) {
            if (enums[i].getType() == type) {
                return enums[i];
            }
        }

        return null;
    }
}
